//
//  CRKit.h
//  TestPrj
//
//  Created by 朱铅峰 on 2020/8/3.
//  Copyright © 2020 Xing. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CRKitConfig.h"
#import "CRKitInfo.h"
#import "CRKitInfoFetchOption.h"
#import "CRCellLayoutConfig.h"
#import "CRKitDataProvider.h"

@interface CRKit : NSObject

+ (instancetype)sharedKit;

proStrong NSBundle *resourceBundle;//图片资源

proStrong NSBundle *emoticonBundle;//表情资源

proStrong CRKitConfig *config;//UI 配置器

/**
 *  内容提供者，由上层开发者注入。如果没有则使用默认 provider
 */
@property (nonatomic,strong)    id<CRKitDataProvider> provider;

/**
 *  注册自定义的排版配置，通过注册自定义排版配置来实现自定义消息的定制化排版
 */
- (void)registerLayoutConfig:(id<CRCellLayoutConfig>)layoutConfig;

/**
 *  返回当前的排版配置
 */
- (id<CRCellLayoutConfig>)layoutConfig;

/**
 *  返回用户信息
 */
- (CRKitInfo *)infoByUser:(NSString *)userId
                   option:(CRKitInfoFetchOption *)option;

/**
 *  返回群信息
 */
- (CRKitInfo *)infoByTeam:(NSString *)teamId
                   option:(CRKitInfoFetchOption *)option;

/**
 *  返回群信息
 */
- (CRKitInfo *)infoBySuperTeam:(NSString *)teamId
                        option:(CRKitInfoFetchOption *)option;

@end
